package stuff;

import gui.GUIMain;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JFrame;

public class DisposeAction extends AbstractAction{
	private static final long serialVersionUID = 1L;
	private JFrame cur;
	private JFrame ex;
	private GUIMain exGUI;
	public DisposeAction(JFrame cur, JFrame ex, GUIMain exGUI) {
		this.cur = cur;
		this.ex = ex;
		this.exGUI = exGUI;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		ex.setLocation(cur.getLocation());
		ex.setSize(cur.getSize());
		exGUI.setVisible(true);
		exGUI.requestFocus();
		cur.dispose();
		
	}
}
